package com.zhongxiangspace.enums;

/**
 * 面积范围
 */
public enum AreaExtentEnum {

    AREA_EXTENT_0_100("a1",0, 100),
    AREA_EXTENT_100_200("a2",100, 200),
    AREA_EXTENT_200_300("a3",200, 300),
    AREA_EXTENT_300_500("a4",300, 500),
    AREA_EXTENT_500_1000("a5",500, 1000),
    AREA_EXTENT_1000_100000("a6",1000, 100000);

    private String name;
    private Integer min;
    private Integer max;

    AreaExtentEnum(String name, Integer min, Integer max) {
        this.name = name;
        this.min = min;
        this.max = max;
    }


    public static AreaExtentEnum getEnumObject(String name) {
        for (AreaExtentEnum r : AreaExtentEnum.values()) {
            if (r.getName().equals(name)) {
                return r;
            }
        }
        return AreaExtentEnum.AREA_EXTENT_0_100;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getMin() {
        return min;
    }

    public void setMin(Integer min) {
        this.min = min;
    }

    public Integer getMax() {
        return max;
    }

    public void setMax(Integer max) {
        this.max = max;
    }
}
